package com.advert.model.support;

import com.advert.util.Sortable;

import javax.persistence.*;

@Entity
@Table(name = "s_vehicle_model")
@NamedQueries(
@NamedQuery(name = "VehicleModelEntity.searchModel",
            query = "select vm from VehicleModelEntity vm where vm.typeCode = :typeCode and vm.categoryCode = :categoryCode and vm.brandId = :brandId")
)
public class VehicleModelEntity implements Sortable {
    @Id
    @Column(name = "id", insertable = false, updatable = false)
    private Integer id;

    @Column(name = "type_cd", insertable = false, updatable = false)
    private String typeCode;

    @Column(name = "category_cd", insertable = false, updatable = false)
    private String categoryCode;

    @Column(name = "brand_id", insertable = false, updatable = false)
    private Integer brandId;

    @Column(name = "name", insertable = false, updatable = false)
    private String name;


    public Integer getId() {
        return id;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public Integer getBrandId() {
        return brandId;
    }

    public String getName() {
        return name;
    }


    public String getSortingValue() {
        return name;
    }
}
